load("@rules_go//go:def.bzl", "go_library", "go_test")

go_library(
    name = "common",
    srcs = [
        "bazel_clean_step.go",
        "bazel_flags.go",
        "bazel_utils.go",
        "goldctl_steps.go",
        "perf_steps.go",
    ],
    importpath = "go.skia.org/skia/infra/bots/task_drivers/common",
    visibility = ["//visibility:public"],
    deps = [
        "//bazel/device_specific_configs",
        "@com_github_shirou_gopsutil//disk",
        "@org_skia_go_infra//go/common",
        "@org_skia_go_infra//go/exec",
        "@org_skia_go_infra//go/gcs",
        "@org_skia_go_infra//go/now",
        "@org_skia_go_infra//go/skerr",
        "@org_skia_go_infra//go/util",
        "@org_skia_go_infra//task_driver/go/lib/os_steps",
        "@org_skia_go_infra//task_driver/go/td",
    ],
)

go_test(
    name = "common_test",
    srcs = [
        "bazel_clean_step_test.go",
        "bazel_utils_test.go",
        "goldctl_steps_test.go",
        "perf_steps_test.go",
    ],
    embed = [":common"],
    deps = [
        "//infra/bots/task_drivers/testutils",
        "@com_github_stretchr_testify//assert",
        "@com_github_stretchr_testify//require",
        "@org_skia_go_infra//go/exec",
        "@org_skia_go_infra//go/exec/testutils",
        "@org_skia_go_infra//go/gcs",
        "@org_skia_go_infra//go/gcs/mocks",
        "@org_skia_go_infra//go/now",
        "@org_skia_go_infra//go/testutils",
        "@org_skia_go_infra//task_driver/go/lib/os_steps",
        "@org_skia_go_infra//task_driver/go/td",
    ],
)
